package com.cdie.myschool.controller;

import com.cdie.myschool.common.R;
import com.cdie.myschool.domain.entity.*;
import com.cdie.myschool.service.StudentDataImportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.ParseException;
import java.util.List;

/**
 * @author 朱华扬
 * @date 2022/10/12 19:39
 * @Description
 */
@RestController
@RequestMapping("/studentDataImport")
public class StudentDataImportController {
    @Autowired
    private StudentDataImportService studentDataImportService;

    /**
     * 功能描述: 导入学期学年信息
     * @Param: []
     * @Return: com.cdie.myschool.common.R
     * @Author: 朱华扬
     * @Date: 2022/10/13 10:00
     */
    @RequestMapping("/calendarInfoImport")
    public R calendarInfo() throws ParseException{
        return studentDataImportService.setCalendarInfo();
    }

    /**
     * 功能描述: 导入学生信息
     * @Param: []
     * @Return: com.cdie.myschool.common.R
     * @Author: 朱华扬
     * @Date: 2022/10/13 10:00
     */
    @RequestMapping("/studentInfoImport")
    public R studentInfo() throws ParseException{
       return studentDataImportService.setStudentInfo();
    }

    /**
     * 功能描述: 导入院系信息
     * @Param: []
     * @Return: com.cdie.myschool.common.R
     * @Author: 朱华扬
     * @Date: 2022/10/13 10:25
     */
    @RequestMapping("/departmentInfoImport")
    public R departmentInfo() throws ParseException{
        return studentDataImportService.setDepartmentInfo();
    }

    /**
     * 功能描述: 导入学生专业信息
     * @Param: []
     * @Return: com.cdie.myschool.common.R
     * @Author: 朱华扬
     * @Date: 2022/10/13 10:25
     */
    @RequestMapping("/majorInfoImport")
    public R majorInfo() throws ParseException{
        return studentDataImportService.setMajorInfo();
    }

    /**
     * 功能描述: 导入学生班级信息
     * @Param: []
     * @Return: com.cdie.myschool.common.R
     * @Author: 朱华扬
     * @Date: 2022/10/13 10:25
     */
    @RequestMapping("/classesInfoImport")
    public R classesInfo() throws ParseException{
        return studentDataImportService.setClassesInfo();
    }

    /**
     * 功能描述: 导入课程信息
     * @Param: []
     * @Return: com.cdie.myschool.common.R
     * @Author: 朱华扬
     * @Date: 2022/10/13 10:25
     */
    @RequestMapping("/courseInfoImport")
    public R courseInfo() throws ParseException{
        return studentDataImportService.setCourseInfo();
    }

    /**
     * 功能描述: 导入学生奖学金信息
     * @Param: []
     * @Return: com.cdie.myschool.common.R
     * @Author: 朱华扬
     * @Date: 2022/10/13 9:47
     */
    @RequestMapping("/scholarshipInfoImport")
    public R scholarship() throws ParseException {
        return studentDataImportService.setScholarship();
    }

    /**
     * 功能描述: 导入学生素质教育积分信息
     * @Param: []
     * @Return: com.cdie.myschool.common.R
     * @Author: 朱华扬
     * @Date: 2022/10/13 9:35
     */
    @RequestMapping("/qualityEducationImport")
    public R qualityEducationImport() throws ParseException {
        return studentDataImportService.setQualityEducation();
    }
}
